<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>相对定位</title>
    <style>
        div{
            width: 100px;
            height: 100px;
            border: 1px solid red;
        }
        div:hover{
            /*margin: 30px 0 0 30px;*/
            /*相对定位:可以实现层叠效果,不影响其他元素的位置*/
            position: relative;
            top: 30px;
            left:30px;
        }


    </style>

</head>
<body>
<div>div1</div>
<div>div2</div>
<div>div3</div>



</body>
</html>